﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="login.aspx.cs" Inherits="FAfx.BootstrapWizard.login" MasterPageFile="~/FAfx.BootstrapWizard.Master" %>
<%@ Register  Assembly="FAfx.BootstrapWizard" Namespace="FAfx.BootstrapWizard.Controls" TagPrefix="FAfx"%>
<asp:Content ID="cMainContent" runat="server" ContentPlaceHolderID="cphMainContent" ClientIDMode="Static">

	<div class="container">
		<div class="col-md-4">
			<h2>Log onto FAfx.BootstrapWizard</h2>
			<form runat="server" role="form">
				<asp:FormView ID="fvLogin" runat="server"
					DefaultMode="Insert"
					ItemType="FAfx.BootstrapWizard.LoginModel"
					InsertMethod="fvLogin_InsertItem">
					<InsertItemTemplate>
						<div class="form-group">
							<label for="txtUserName">User Name:</label>
							<asp:TextBox ID="txtUserName" runat="server"
								CssClass="form-control"
								placeholder="User Name"
								Text="<%#: BindItem.UserName %>" />
							<FAfx:DataAnnotationValidator runat="server" 
								CssClass="label label-warning" Display="Dynamic" SetFocusOnError="true" 								
								ControlToValidate="txtUserName" 
								SourceTypeName="FAfx.BootstrapWizard.LoginModel"
								PropertyToValidate="UserName"/>
						</div>
						<div class="form-group">
							<label for="txtPassword">Password:</label>
							<asp:TextBox ID="txtPassword" runat="server"
								TextMode="Password"
								CssClass="form-control"
								placeholder="Password"
								Text="<%#: BindItem.Password %>" />
							<FAfx:DataAnnotationValidator runat="server" 
								CssClass="label label-warning" Display="Dynamic" SetFocusOnError="true" 								
								ControlToValidate="txtPassword" 
								SourceTypeName="FAfx.BootstrapWizard.LoginModel"
								PropertyToValidate="Password"/>
						</div>
						<div class="checkbox">
							<label>
								<asp:CheckBox ID="inpRememberMe" runat="server"
									CssClass="form-horizontal"
									Checked="<%# BindItem.RememberMe %>" />Remember me
							</label>
						</div>
						<div runat="server" class="form-group">
							<asp:ValidationSummary runat="server" CssClass="alert alert-warning" ShowModelStateErrors="true" DisplayMode="BulletList" />
						</div>
						<div class="form-group">
							<asp:Button ID="btnLogin" runat="server"
								CommandName="Insert"
								CssClass="btn btn-success"
								Text="Log In" />
						</div>

					</InsertItemTemplate>
				</asp:FormView>
			</form>
		</div>
	</div>

</asp:Content>
